package com.xiyu.service.convert.statistics;

import com.xiyu.service.vo.statistics.statisticsCustomer.StatisticsCustomerDealConvertQueryOutput;
import com.xiyu.service.vo.statistics.statisticsCustomer.StatisticsCustomerKeyTrendQueryOutput;

import java.time.LocalDateTime;
import java.util.*;

import org.babyfish.jimmer.sql.ast.tuple.Tuple3;
import org.babyfish.jimmer.sql.ast.tuple.Tuple4;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 客户统计 Convert
 */
@Mapper
public interface StatisticsCustomerConvert {
    StatisticsCustomerConvert INSTANCE = Mappers.getMapper(StatisticsCustomerConvert.class);

    @Mapping(source = "_1", target = "ownerId")
    @Mapping(source = "_2", target = "statisticsTime")
    @Mapping(source = "_3", target = "createCount")
    @Mapping(source = "_4", target = "followCount")
    StatisticsCustomerKeyTrendQueryOutput keyTrendQueryOutputConvert(Tuple4<Long, LocalDateTime, Long, Long> output);

    List<StatisticsCustomerKeyTrendQueryOutput> keyTrendQueryOutputConvert(List<Tuple4<Long, LocalDateTime, Long, Long>> output);

    @Mapping(source = "_1", target = "ownerId")
    @Mapping(source = "_2", target = "dealCount")
    @Mapping(source = "_3", target = "totalCount")
    StatisticsCustomerDealConvertQueryOutput dealConvertQueryOutputConvert(Tuple3<Long, Long, Long> output);

    List<StatisticsCustomerDealConvertQueryOutput> dealConvertQueryOutputConvert(List<Tuple3<Long, Long, Long>> output);
}
